<template>
    <div>
 <van-nav-bar
  title="推荐"
  right-text="发布"
  @click-right="release"
/>
<page-dish :val='data'></page-dish>
    </div>
</template>

<script>
import PageDish from '@/components/PageDish.vue'
    export default {
  components: { PageDish },
  data() {
    return {
        data: '',
    }
  },
        methods: {
            release() {
                this.$router.push('/releaseitem')
            },
            recommend(){
                let url = '/recipes/list/' + JSON.parse(sessionStorage.getItem('user')).id
                this.axios.get(url).then((res) => {
                    console.log(res.data.data)
                    this.data = res.data.data
                })
            }
        },
        mounted () {
            this.recommend()
        },
    }
</script>

<style lang="scss" scoped>

</style>